<%@ page import="com.studentManagement.po.Teacher" %><%--
  Created by IntelliJ IDEA.
  User: free
  Date: 2017/8/5
  Time: 7:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人信息</title>
    <script src="${pageContext.request.contextPath}/resources/js/jquery.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css" type="text/css">
    <script src="${pageContext.request.contextPath}/resources/js/bootstrap.min.js"></script>

    <script src="${pageContext.request.contextPath}/resources/js/teacher_myInfo.js"></script>
    <style>
        form{
            width: 400px;
            margin-left: 30%;
        }
    </style>
</head>
<body>
<jsp:include page="/jsp/teacher/top.jsp"/>
<div class="container">
    <div class="row clearfix">
<%Teacher teacher= (Teacher) request.getSession().getAttribute("teacher");%>
        <form  action="/TeacherServlet?action=updateTeacherInfo" method="post" enctype="multipart/form-data" class="form-horizontal" role="form">
            <input type="hidden" id="message" value="${message}"><%--把提交的结果放在隐藏域中，转给jquery--%>
            <div class="form-group" >
                <label for="teacher_name" class="col-sm-2 control-label">姓名</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="teacher_name" id="teacher_name" value="${teacher.teacher_name}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">性别</label>&nbsp;&nbsp;
            <label class="radio-inline">
                <input type="radio" name="teacher_sex"  value="1" checked>男
            </label>
            <label class="radio-inline">
                <input type="radio" name="teacher_sex"   value="0">女
            </label>
            </div>
            <div class="form-group" >
                <label for="teacher_age" class="col-sm-2 control-label">年龄</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="teacher_age" id="teacher_age" value="${teacher.teacher_age}" >
                </div>
            </div>

            <div class="form-group" >
                <label for="teacher_phone" class="col-sm-2 control-label">手机</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="teacher_phone" disabled="disabled" value="${teacher.teacher_phone}" >
                </div>
            </div>

            <div class="form-group" >
                <label for="teacher_email" class="col-sm-2 control-label">邮箱</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="teacher_email" disabled="disabled" value="${teacher.teacher_email}" >
                </div>
            </div>

            <br>
            <input style="margin-left: 15px;width: 390px;" type="submit" value="修改" class="btn btn-primary margin-padding">
            <br>
            <br>
            <input style="margin-left: 15px;width: 390px;" type="reset" value="重置" class="btn btn-primary margin-padding">
            <div class="row">
                <div class="image col-sm-6 col-md-3"  style="position: relative;top:-350px; right: -600px; width: 120px;height: 120px">
                    <a href="${pageContext.request.contextPath}/resources/images/upload/${ teacher.teacher_image_Path==""||teacher.teacher_image_Path==null  ? 'default.jpg' : teacher.teacher_image_Path  }" target="_blank" class="thumbnail">
                        <img id="getTeacherImg"  src="${pageContext.request.contextPath}/resources/images/upload/${ teacher.teacher_image_Path=="" ||teacher.teacher_image_Path==null ? 'default.jpg' : teacher.teacher_image_Path  }" style="display: inline-block;width: 120px;height: 120px;" alt="教师照片">
                    </a>
                    <input type="file" onchange="previewFile()" name="teacher_image_Path">
                </div>
            </div>
        </form>
    </div>
</div>

</body>
</html>
